package com.tc.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/****
 * @Author:admin
 * @Description:Order构建
 * @Date 2019/6/14 19:13
 *****/
@ApiModel(description = "Order",value = "Order")
@Table(name="`order`")
public class Order implements Serializable{

	@ApiModelProperty(value = "订单id",required = false)
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	private Long id;//订单id

	@ApiModelProperty(value = "用户的id",required = false)
    @Column(name = "`uid`")
	private Integer uid;//用户的id

	@ApiModelProperty(value = "司机的id",required = false)
    @Column(name = "`did`")
	private Long did;//司机的id

	@ApiModelProperty(value = "汽车的id号",required = false)
    @Column(name = "`tid`")
	private Long tid;//汽车的id号

	@ApiModelProperty(value = "订单编号",required = false)
    @Column(name = "`order_Sn`")
	private String orderSn;//订单编号

	@ApiModelProperty(value = "提交时间",required = false)
    @Column(name = "`create_Time`")
	private Date createTime;//提交时间

	@ApiModelProperty(value = "订单状态：0->待付款；1->待接单；2->已接单；3->已完成；4->已关闭；5->无效订单",required = false)
    @Column(name = "`status`")
	private Integer status;//订单状态：0->待付款；1->待接单；2->已接单；3->已完成；4->已关闭；5->无效订单


	@ApiModelProperty(value = "起步价",required = false)
	@Column(name = "`price`")
	private Double price;//订单总金额

	@ApiModelProperty(value = "订单总金额",required = false)
    @Column(name = "`total_Amount`")
	private Double totalAmount;//订单总金额

	@ApiModelProperty(value = "应付金额（实际支付金额）有优惠券功能考虑",required = false)
    @Column(name = "`pay_Amount`")
	private Double payAmount;//应付金额（实际支付金额）有优惠券功能考虑

	@ApiModelProperty(value = "支付方式：0->未支付；1->支付宝；2->微信",required = false)
    @Column(name = "`pay_Type`")
	private Integer payType;//支付方式：0->未支付；1->支付宝；2->微信

	@ApiModelProperty(value = "运输公司的id",required = false)
    @Column(name = "`cid`")
	private Integer cid;//运输公司的id

	@ApiModelProperty(value="距离",required = false)
	@Column(name = "`distance`")
	private Long distance;//运输公司的id



	//get方法
	public Long getId() {
		return id;
	}

	//set方法
	public void setId(Long id) {
		this.id = id;
	}
	//get方法
	public Long getDid() {
		return did;
	}

	//set方法
	public void setDid(Long did) {
		this.did = did;
	}
	//get方法
	public Long getTid() {
		return tid;
	}

	//set方法
	public void setTid(Long tid) {
		this.tid = tid;
	}
	//get方法
	public String getOrderSn() {
		return orderSn;
	}

	//set方法
	public void setOrderSn(String orderSn) {
		this.orderSn = orderSn;
	}
	//get方法
	public Date getCreateTime() {
		return createTime;
	}

	//set方法
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	//get方法
	public Integer getStatus() {
		return status;
	}

	//set方法
	public void setStatus(Integer status) {
		this.status = status;
	}
	//get方法
	public Double getTotalAmount() {
		return totalAmount;
	}

	//set方法
	public void setTotalAmount(Double totalAmount) {
		this.totalAmount = totalAmount;
	}
	//get方法
	public Double getPayAmount() {
		return payAmount;
	}

	//set方法
	public void setPayAmount(Double payAmount) {
		this.payAmount = payAmount;
	}
	//get方法
	public Integer getPayType() {
		return payType;
	}

	//set方法
	public void setPayType(Integer payType) {
		this.payType = payType;
	}
	//get方法
	public Integer getCid() {
		return cid;
	}

	//set方法
	public void setCid(Integer cid) {
		this.cid = cid;
	}


	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Long getDistance() {
		return distance;
	}

	public void setDistance(Long distance) {
		this.distance = distance;
	}

	public Integer getUid() {
		return uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}
}
